﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="wfAgregarProductoPromocion.aspx.cs" Inherits="WebGustozzi.ModuloVentas.wfAgregarProductoPromocion" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Aplicación Web Gustozzi</title>
    <link href="//App_Themes/SkinFile/StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../SCRIPT/ManejarControles.js"></script> 
    <script type="text/javascript" src="../SCRIPT/DialogosMaster.js"></script> 
    <script type="text/javascript">

        function cerrar() {
            window.close();
          }

          function volverValor() {
              window.opener.document.getElementById('hdfNumItems').value = window.document.getElementById("hdfCantidadItems");
              window.close();
          }

        function AbrirModalPopup(nombrePagina, ancho, alto) {
            var atributos = 'dialogWidth:' + ancho + 'px' + ';dialogHeight:' + alto + 'px' + ';status:no;resizable:no;scroll:yes;center:yes';
            window.showModalDialog(nombrePagina, self, atributos);
            return false;
        }

        if (window.dialogArguments) {
            window.opener = window.dialogArguments;
        }

        function BuscarProducto() {
            AbrirModalPopup('wfBuscarProducto.aspx', 850, 400);
        }


    </script>
    <style type="text/css">
        .style1
        {}
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server"><contenttemplate> 

        <div class="popup_Container">
        <div class="popup_Titlebar" id="PopupHeader">
            <div class="TitlebarLeft">            
                <%--Titulo--%>
                  <table style="width:100%" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td >
                            <asp:Label id="Label12" runat="server" Text=":: AGREGAR PRODUCTO" 
                                SkinID="labelTitulo"></asp:Label>
                        </td>
                    </tr>    
                    <tr>
                        <td style="HEIGHT: 10px"></td>
                    </tr>
                </table>
            </div>
            <div class="TitlebarRight" onclick="cancel();">
            </div>
        </div>
        <div class="popupBusqueda">
        <div id="contenedor2">
        <asp:HiddenField ID="hdf_InicioGrilla" runat="server"/>
    
            <asp:HiddenField ID="hdfCantidadItems" runat="server" />
    
        <%--Datos del Busqueda--%>
        <table style="width:100%" cellpadding="0" cellspacing="0" border="0" class="tdmarcoTitulo">
            <tr>
                <td colspan="12">
                <table style="width:100%" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td class="tdfondoTitulo" style="width:100%; HEIGHT: 18px" align="left">
                            <asp:Label ID="Label1" runat="server" SkinID="labelsubTituloSkin"  
                                Text=" :: Datos Producto" Width="230px"></asp:Label>
                        </td>
                    </tr>
                </table>
                </td>
            </tr>
          
            <div id="divPromocion" runat="server" visible="false">
            <tr>
                <td  style="width:10px; height: 26px;">
                </td>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="Categoria" SkinID="labelTextSkin" 
                        Width="70px"></asp:Label>
                </td>
                <td colspan="3">

                    <asp:DropDownList ID="ddlCategoria" runat="server" 
                        SkinID="DropDownListTextSkin" Width="161px" 
                        AppendDataBoundItems="True" AutoPostBack="True" 
                        onselectedindexchanged="ddlCategoria_SelectedIndexChanged">
                        <asp:ListItem Value="">--Seleccionar--</asp:ListItem>
                    </asp:DropDownList>

                </td>
                <td style="width:100px" align="right">
                    <asp:Label ID="Label11" runat="server" Height="16px" SkinID="labelTextSkin" 
                        Text="Producto" Width="50px"></asp:Label>&nbsp;
                </td>
                <td colspan="5">
                    <asp:DropDownList ID="ddlProductoCategoria" runat="server" 
                        onselectedindexchanged="ddlProductoCategoria_SelectedIndexChanged" 
                        SkinID="DropDownListTextSkin" Width="186px" AutoPostBack="True" 
                        AppendDataBoundItems="True" style="height: 19px">
                        <asp:ListItem Value="">--Seleccionar--</asp:ListItem>
                    </asp:DropDownList>
                </td >
                <td></td>
            </tr>
            </div>
            <div id="divProducto" runat="server" visible="true">
          
            </div>
            <tr>
                <td  style="width:10px; height: 26px;">
                </td>
                <td >
                    <asp:Label ID="Label4" runat="server" Text="Precio" SkinID="labelTextSkin" 
                        Width="70px"></asp:Label>
                </td>
                <td style="width:80px">
                    <asp:TextBox ID="txtPreUnit" runat="server" SkinID="CajaTextoSkinNum" 
                        Width="50px"></asp:TextBox>

                </td>
                <td align="right">
                    <asp:Label ID="Label6" runat="server" SkinID="labelTextSkin" Text="Unidad"></asp:Label>
                    &nbsp;</td>
                <td colspan="2">
                    <asp:TextBox ID="txtUnidad" runat="server" 
                        SkinID="CajaTextoBloqueadoSkin" Width="50px" Enabled="False"></asp:TextBox>
                </td>
                <td align="right" width="60px">
                    <div ID="divPromo2" runat="server" visible="true">
                        <asp:Label ID="Label8" runat="server" SkinID="labelTextSkin" Text="Cantidad"></asp:Label>
                        &nbsp;</div>
                </td>
                <td>
                    <asp:TextBox ID="txtCantidad" runat="server" 
                            SkinID="CajaTextoSkinNum" Width="50px" style="margin-top: 5px" 
                        AutoPostBack="True"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td align="right" width="110px" >
                    &nbsp;</td>
                <td class="style1" colspan="2">
                    &nbsp;</td>
            </tr>
            <tr><td style="height:5px"></td></tr>
        </table>
        <table>
            <tr style="height:10px"><td></td></tr>
        </table>

        <div id="divMensaje" runat="server" visible = "false">
        <table style="width:100%" cellpadding="0" cellspacing="0" border="0">
                <tr><td align="center">
                    <asp:Label ID="lblMsj" runat="server" SkinID="labelMessageSkin"></asp:Label>
                </td></tr>
        </table>
        </div>
        <%--Controles de comando--%>
        <table>
            <tr>
                <td style="height:26px" align="left" >
                    &nbsp;<asp:ImageButton 
                        ID="imbAceptar" runat="server" 
                        ImageUrl="~/imagenes/bn_Aceptar.jpg" 
                        ToolTip="Aceptar" onclick="imbAceptar_Click" onclientclick="volverValor()"   />
                    &nbsp;<asp:ImageButton ID="imbCerrar" runat="server" 
                        ImageUrl="~/imagenes/bn_cerrar.jpg" 
                        ToolTip="Nuevo Producto" onclientclick="cerrar()"  />
            </td></tr>
        </table>

        <table>
            <tr style="height:10px"><td>
                </td></tr>
        </table>

       </div>

        </div>
        
    </div>

    </contenttemplate> </asp:UpdatePanel>
    </form>
</body>
</html>
